<?php
/**
 * Created by PhpStorm.
 * User: 庆金
 * Date: 2019-12-21
 * Time: 21:16
 * pstree -p 16027 查看进程和子进程
 * ps aft|grep http 查看子进程地址。
 */
// 第二个参数为true，不打印到屏幕，为false则打印到屏幕
$process = new swoole_process(function (swoole_process $pro){
    $pro->exec("/usr/bin/php",[__DIR__.'/../server/http_server.php']);
},false);
$pid = $process->start();
echo $pid.PHP_EOL;
swoole_process::wait();